package com.runa.rccprotocol.dto.param;

public class ExtendParamCode13 extends ExtendParam {

    private float flowLimit;

    private float allowDiff;

    public ExtendParamCode13(float flowLimit, float allowDiff) {
        this.flowLimit = flowLimit;
        this.allowDiff = allowDiff;
    }

    public float getFlowLimit() {
        return flowLimit;
    }

    public void setFlowLimit(float flowLimit) {
        this.flowLimit = flowLimit;
    }

    public float getAllowDiff() {
        return allowDiff;
    }

    public void setAllowDiff(float allowDiff) {
        this.allowDiff = allowDiff;
    }

    @Override
    public byte[] toBuffer() {
        byte[] bs = new byte[12];
        bs[0] = 10;
        bs[1] = 0;
        bs[2] = 13;
        bs[3] = 0;
        dataFormat6(flowLimit, bs, 4);
        dataFormat6(allowDiff, bs, 8);
        return bs;
    }
}
